a=int(input())
b=eval(input())
c=[]
for i in range(a):
    c.append(i)
c.reverse()
for i in range(1,len(c)):
    if c[i+1]<b<c[i]:
        c.insert(i+1,b)
    elif b>c[0]:
        c.insert(0,b)
    elif b<c[-1]:
        c.append(b)
print(c)
